<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta charset="utf-8">
	<title>后台管理页面</title>
	<style type="text/css">
		html,body{
			width: 98%;
			height: 100%;
		}
		#content{
			width: 60%;
			height: 90%;
			margin:0 auto;
			border-style: solid;
		}
		#top{
			width: 100%;
			border-bottom: solid;
		}
		#left{
			float:left;
			width: 30%;
			height: 90%;
		}
		#right{
			width: 65%;
			float: right;
			height: 70%;
		}
		.menue{
			width: 100%;
			height: 40px;
		}
		.ttt{
			width: 90%;
			height: 35px;
		}
	</style>
	<script type="text/javascript">
			
	</script>
</head>
<body>
	<div id="content">
		<div id="top">
			<center><h1>简陋的后台管理界面</h1></center>
		</div>
		<div id="left">
			<%String flag = (String)request.getAttribute("flag"); %>
			<center><label>Action</label></center>
			<input class="menue" type="button" name="" <% if(!flag.equals("class"))out.print("disabled=''"); %> value="发布班级活动新闻">
			<input class="menue" type="button" name="" <% if(!flag.equals("class"))out.print("disabled=''"); %> value="发布班级思想教育新闻">
			<input class="menue" type="button" name="" <% if(!flag.equals("college"))out.print("disabled=''"); %> value="发布学院动态新闻">
			<input class="menue" type="button" name="" <% if(!flag.equals("admin"))out.print("disabled=''"); %> value="新增学院">
			<input class="menue" type="button" name="" <% if(!flag.equals("college"))out.print("disabled=''"); %> value="新增班级">
			<input class="menue" type="button" name="" value="遇到问题？点此查看帮助">
		</div>
		<table border="2px" cellpadding="0" cellspacing="0" style="height:90%;border-left-style:solid; border-bottom-style:none;border-right-style:none;border-top-style:none">
		<div id="right">
			<%if(flag.equals("class")){ %>
			<div id="tool1">
				<form enctype="multipart/form-data" action="AddClassNews.do" method="post">
				<center><h2>发布班级活动新闻</h2></center><br>
				<input type="hidden" name="who" value="activity">
					<input class="ttt" type="text" name="title" value="请添加标题" onfocus="this.value=''" onblur="if(this.value=='') this.value='请添加标题'"><br>
					<input class="ttt" type="file" name="img" value="请添加文章封面图片" onfocus="this.value=''" onclick="alert('这里请选择文章封面图片：\njpg,png,jpeg格式')"><br>
					<input class="ttt" type="file" name="MSword" value="请添加Word格式文章" onfocus="this.value=''" onclick="alert('这里请选择word97-03格式word文档\n即后缀名为.doc的文件。请勿上传.docx类型文件！！！\n.docx文档如何操作请查看帮助')"><br>
					<input class="ttt" type="submit" name="" value="发表" onfocus="this.value=''"><br>
				</form>
			</div>

			<div id="tool2">
				<form  enctype="multipart/form-data" action="AddClassNews.do" method="post">
				<center><h2>发布班级思想教育新闻</h2></center><br>
				<input type="hidden" name="who" value="mind">
					<input class="ttt" type="text" name="title" value="请添加标题" onfocus="this.value=''" onblur="if(this.value=='') this.value='请添加标题'"><br>
					<input class="ttt" type="file" name="img" value="请添加文章封面图片" onfocus="this.value=''" onclick="alert('这里请选择文章封面图片：\njpg,png,jpeg格式')"><br>
					<input class="ttt" type="file" name="MSword" value="请添加Word格式文章" onfocus="this.value=''" onclick="alert('这里请选择word97-03格式word文档\n即后缀名为.doc的文件。请勿上传.docx类型文件！！！\n.docx文档如何操作请查看帮助')"><br>
					<input class="ttt" type="submit" name="" value="发表" onfocus="this.value=''"><br>
				</form>
			</div>
			<%} if(flag.equals("college")){%>
			<div id="tool3" <% if(!flag.equals("college"))out.print("hidden='hidden'"); %>>
				<form method="post" action="addCollegeNews.do" enctype="multipart/form-data">
				<center><h2>发布学院活动新闻</h2></center><br>
					<input class="ttt" type="text" name="title" value="请添加标题" onfocus="this.value=''" onblur="if(this.value=='') this.value='请添加标题'"><br>
					<input class="ttt" type="file" name="img" value="请添加文章封面图片" onfocus="this.value=''" onclick="alert('这里请选择文章封面图片：\njpg,png,jpeg格式')"><br>
					<input class="ttt" type="file" name="MSword" value="请添加Word格式文章" onfocus="this.value=''" onclick="alert('这里请选择word97-03格式word文档\n即后缀名为.doc的文件。请勿上传.docx类型文件！！！\n.docx文档如何操作请查看帮助')"><br>
					<input class="ttt" type="submit" name="" value="发表"><br>
				</form>

			</div>
			
			<div id="tool5" <% if(!flag.equals("college"))out.print("hidden='hidden'"); %>>
				<form action="AddClass.do" method="post"  enctype="multipart/form-data">
				<center><h2>新增班级</h2></center><br>
					<input class="ttt" type="text" name="className" value="请输入待添加班级名称" onfocus="this.value=''" onblur="if(this.value=='') this.value='请输入待添加班级名称'"><br>
					<input class="ttt" type="file" name="img" onclick="alert('请为班级添加头像（必选）')">
					<input class="ttt" type="text" name="passwd" value="请添加此班级的管理密码" onfocus="this.value=''" onblur="if(this.value=='') this.value='请添加此班级的管理密码'"><br>
					<input class="ttt" type="submit" name="submit" value="发表"><br>
				</form>

			</div>
			<%} if(flag.equals("admin")){%>
			<div id="tool4" <% if(!flag.equals("admin"))out.print("hidden='hidden'"); %>>
				<form method="post" action="AddCollege.do"  enctype="multipart/form-data">
				<center><h2>新增学院</h2></center><br>
					<input class="ttt" type="text" name="college" value="请输入待添加学院名称" onfocus="this.value=''" onblur="if(this.value=='') this.value='请输入待添加学院名称'"><br>
					<input class="ttt" type="file" name="img" onclick="alert('请为学院添加头像（必选）')">
					<input class="ttt" type="text" name="passwd" value="请添加此学院的管理密码" onfocus="this.value=''" onblur="if(this.value=='') this.value='请添加此学院的管理密码'"><br>
					<input class="ttt" type="submit" name="submit" value="添加" onfocus="this.value=''"><br>
				</form>

			</div>
			<%} %>

			<%=request.getAttribute("zt") %>



		</div>
	</div>
</body>
</html>